<?php $this->load->view('templates/backend/header'); ?>
<?php $this->load->view('templates/backend/lib'); ?>
<h3><?php echo mb_strtolower($this->lang->line('share'), 'utf-8')?></h3>

<?php if (isset($flash_message)  && $flash_message!=NULL ): ?>
<div class="alert alert-success"><a class="close" share-dismiss="alert">x</a><strong><?php echo $flash_message; ?></strong></div>
<?php endif; ?>
<div class="well">
	<?php echo form_open();?>
            <div class="top-button">
                    <?php echo form_button(array('id' => 'submit', 'value' => 'Update', 'name' => 'submit', 'type' => 'submit', 'content' => $this->lang->line('save'),'class' => 'btn btn-primary')); ?>
                    <a href="<?php echo site_url('auth/listcustomers'); ?>" class="btn"><?php echo $this->lang->line('cancel')?></a>
            </div>

            <div class="tab-content">	
			<div class="tab-pane active" id="main">
				<?php
                                //ho ten
				echo form_label($this->lang->line('customersName'), 'name');
				echo form_input(array('name' => 'name', 'id' => 'name', 'value' => (isset($share->name))?$share->name:'','readonly' => 'true'));
				echo form_error('name');
                                
                                echo form_input(array('type'=>'hidden', 'name' => 'customerID', 'id' => 'customerID', 'value' => (isset($share->customerID))?$share->customerID:''));
                                 //staff
                                echo form_label($this->lang->line('staff').' (Chọn 1 người bạn cần chia sẻ)', 'staff');
                                echo form_dropdown('staff', $this->listcustomers_model->getListUsersDist($share->customerID),'');
                                echo form_error('staff');
                                echo form_fieldset_close();
                                
				?>
			</div>
		</div>
		<div class="bottom-button">
			<?php echo form_button(array('id' => 'submit', 'value' => 'Update', 'name' => 'submit', 'type' => 'submit', 'content' => $this->lang->line('save'),'class' => 'btn btn-primary')); ?>
			<a href="<?php echo site_url('auth/listcustomers'); ?>" class="btn"><?php echo $this->lang->line('cancel')?></a>
		</div>
	<?php form_close();?>
</div>

<?php $this->load->view('templates/backend/footer'); ?>
